af4bd572d17460f91191e7175b5dd01badb26338,src/main/java/eu/isas/peptideshaker/cmd/PeptideShakerCLI.java,PeptideShakerCLI,call,#,110

Before Change


                e.printStackTrace();
            }

            waitingHandler.appendReport("PeptideShaker process completed.", true, true);
            waitingHandler.setSecondaryProgressText("Processing Completed.");

            saveReport();
        } catch (Exception e) {
            waitingHandler.appendReport("PeptideShaker processing failed. See the PeptideShaker log for details.", true, true);
            saveReport();
            throw e;
        }

        System.exit(0); // @TODO: Find other ways of cancelling the process? If not cancelled searchgui will not stop.
        // Note that if a different solution is found, the DummyFrame has to be closed similar to the setVisible method in the WelcomeDialog!!
        return null;
    }

After Change


            waitingHandler.setRunCanceled();
        }

        if (!waitingHandler.isRunCanceled()) {
            waitingHandler.appendReport("PeptideShaker process completed.", true, true);
            waitingHandler.setSecondaryProgressText("Processing Completed.");
            System.exit(0); // @TODO: Find other ways of cancelling the process? If not cancelled searchgui will not stop.
            // Note that if a different solution is found, the DummyFrame has to be closed similar to the setVisible method in the WelcomeDialog!!
            return 0;
        } else {
            System.exit(1); // @TODO: Find other ways of cancelling the process? If not cancelled searchgui will not stop.
            // Note that if a different solution is found, the DummyFrame has to be closed similar to the setVisible method in the WelcomeDialog!!
            return 1;
        }
    }